﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WatiN.Core.Native.InternetExplorer;
using WatiN.Core;
using WatiN.Core.Native.Mozilla;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;


namespace WindowsFormsApplication4
{
    class BaiduTest
    {
        public void sou()
        {
            string s = "D://ceshi.txt";
            StreamReader st = File.OpenText(s);
            string kw = st.ReadLine();
            IE ie = new IE("baidu.com");
            ie.TextField(Find.ById("kw")).TypeText(kw);
            ie.Button(Find.ById("su")).Click();
            ie.WaitForComplete();
            ie.Close();

        
        }

    }
}
